package com.beichuan_travel.controller;

import com.beichuan_travel.model.vo.ResultVO;
import com.beichuan_travel.utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags = "各种推荐接口")
@RequestMapping("recommend")
@RestController
public class RecommendController {

    @Resource
    ResponseResult responseResult;


    @ApiOperation(value = "图表推荐")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "uid", value = "用户id", required = true, dataType = "int", paramType = "path"),
            @ApiImplicitParam(name = "limit", value = "获取数据的数量", required = true, dataType = "int", paramType = "query")
    })
    @GetMapping("/v1/chart/{uid}")
    public ResultVO chartRecommendation(@PathVariable("uid") int uid, @RequestParam("limit") int limit) {
        return responseResult.ok();
    }


    @ApiOperation(value = "推荐热搜")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "uid", value = "用户id", required = true, dataType = "int", paramType = "path"),
            @ApiImplicitParam(name = "limit", value = "获取数据的数量", required = true, dataType = "int", paramType = "query")
    })
    @GetMapping("/v1/hot/{uid}")
    public ResultVO recommendedHotSearch(@PathVariable("uid") int uid, @RequestParam("limit") int limit) {
        return responseResult.ok();
    }

}
